<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8"/>
	<title>Backbone.Marionette.js Library</title>
	<link rel="stylesheet" href="css/app.css">
	<link rel="stylesheet" href="css/jquery-ui-1.9.2.css">
	<link rel="stylesheet" href="css/demos.css">
	<script type="text/javascript" src="js/lib/jquery.js"></script>
	<script type="text/javascript" src="js/lib/underscore.js"></script>
	<script type="text/javascript" src="js/lib/backbone.js"></script>
	<script type="text/javascript" src="js/lib/backbone.marionette.js"></script>
	<script>
var BookStoreApp = new Backbone.Marionette.Application();

var BookStoreController = Backbone.Marionette.Controller.extend({
	displayBooks : function (){
		console.log("I will display books...");
	}
});

var BookStoreRouter = Backbone.Marionette.AppRouter.extend({
	controller : BookStoreController,
	appRoutes: {
		"show": "displayBooks"
	}
});

BookStoreApp.addInitializer(function () {
	var controller = new BookStoreController();
	var router = new BookStoreRouter({controller:controller});
	console.log("hello from the addInitializer.");
});

BookStoreApp.on('initialize:after', function () {
	if (Backbone.history) {
		Backbone.history.start();}
	console.log("hello from the initialize:after.");
});

BookStoreApp.start();
	</script>
</head>
<body>
	<div>
		<a href="#show">SHOW</a>
</body>
</html>
